#ifndef _FILLACTION_
#define _FILLACTION_

#include "BaseAction.hpp"
#include "Utilities/StringHelper.hpp"
#include "Content/Map.hpp"
#include <vector>
#include "SFML/Graphics.hpp"
#include "MapResizer.hpp"

/** 
* Sets all tiles to a sprite.
*/
class FillAction:public BaseAction{

    vector<int> tiles;
    Map* target;
    int startTile;
    
    int value;
    int originalValue;
    int layer;
    sf::Rect<int> marqueeSelection;

    int targetX;
    int targetY;

    bool needsResize;
    void fill(int tile);
public:
    bool performed;
    MapResizer::ResizeInfo* resizeResult;
    FillAction(Map* map, sf::Rect<int> marquee, int x, int y, int setTile, int setLayer, char* name);
    virtual void perform();
    virtual void undo();
    ~FillAction();
};

#endif